<?php


require_once 'Zend/Controller/Front.php';
require_once 'Zend/Auth.php';
require_once 'Zend/Controller/Action/HelperBroker.php';
require_once 'Etian/Controllers/Helpers/ViewRenderer.php';

//Initialize Configuration

//Create db object

//Create auth object
$auth = Zend_Auth::getInstance();

if($auth->hasIdentity()) {echo "true";} else {echo "false";}


//Instanciate my own renderer which extends the basic one and
$viewRenderer = new Etian_Controllers_Helpers_ViewRenderer();
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);

/* Run the application */

Zend_Controller_Front::run('C:\Program Files\Apache2.2\apps\etian\controllers');

/*
 * In case I ever need to know how to disable the renderer %/
 */
//Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true);

?> 


/* 

EtianApp documentation
______________________


1. Access Roles
----------------

a) public/non-authenticated
b) admin/authenticated


2. Site layout
--------------

Expressed as :controller/:action notation:-

/Index/index              		--> the NiPage
	  
/RulesOfEngagement/index

/DailyThought/index
	       /thoughtDetail
	       
/YourNiLink/index
	  	/nilinkSubmit
	  	
/SomeStats/index



/Error/index 				--> handles all 404s
      /failure 				--> handles 'Site error' messages
      /privileges		 	--> handles 'You are not privileged...' messages



/AdmArea 						--> a cms to handle all site management



3. Access Rules
---------------

a) public : Index/RoE/Thought/NiLink/Stats | (ClArea,AdmArea)? Login
b) admin : public/clients/AdmArea




TODO List
__________




1. Secure Login: (ajax-based script | https connection)
2. Zend_Config:
-- Login (db_acces);
3. 
 

*/